home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / adclk100.zip / ADJCLOCK.DOC next >
Text File  |  1993-06-29  |  5KB  |  147 lines

  1.  
  2.  
  3.  
  4.        ADJCLOCK.COM     (ADJust CLOCK)                    [v1.0: 29/6/1993]
  5.        ============     ==============
  6.  
  7.  
  8.  
  9.        Program for automatic (non-resident) PC-clock adjustment. When
  10.        called periodically, the program tries to compensate for clock
  11.        inaccuracy.
  12.  
  13.        This program is FreeWare: It might be distributed and used freely.
  14.        There exists no warranty, and the author shall not be liable for any
  15.        loss or damage due to using this program.
  16.  
  17.        Written in C using Borland's great compiler by
  18.  
  19.            Sverre H. Huseby
  20.            Bjoelsengt. 17
  21.            N-0468 Oslo
  22.            Norway
  23.  
  24.            Phone: +47 22 23 05 39
  25.  
  26.            Internet: sverrehu@ifi.uio.no
  27.  
  28.        I you like the program, please do me a small favour: Mail me and
  29.        tell me about it. That's worth more than a few bucks!
  30.  
  31.  
  32.  
  33.        Description
  34.        -----------
  35.  
  36.        The Real Time Clock in many PC's (mine for instance) don't seem to
  37.        keep the `real time' after all. The purpose of this program is to
  38.        periodically (for instance at each boot) adjust the date/time with a
  39.        clock-dependent number of seconds. How many seconds to add or
  40.        subtract also depends on the time passed since the last adjustment.
  41.        To keep track of this, the program updates a small file. This file
  42.        is located in the same directory as the program itself.
  43.  
  44.        For all this to work, the program needs to know the unaccuracy of
  45.        your computer's clock. This is measured once and for all when you
  46.        start using the program. The drawback is that this takes time, but
  47.        fortunately, you won't notice.
  48.  
  49.        ADJCLOCK accepts several different commands on the command line. The
  50.        overall syntax is:
  51.  
  52.            ADJCLOCK command [parameters]
  53.  
  54.        where command is a letter telling the program what to do, and the
  55.        parameters (not needed for all commands) vary according to the
  56.        command.
  57.  
  58.        Several commands accept date and time as parameters. The current
  59.        version of ADJCLOCK uses European date and time format, that is:
  60.  
  61.            Date:   DD/MM/YY
  62.            Time:   HH:MM or HH:MM:SS
  63.  
  64.        Note that the time is given using 24 hours (that is: HH is 0-23).
  65.  
  66.        All commands and their respective parameters are explained below.
  67.        Any parameters in [ ] are optional. The brackets should not be
  68.        entered.
  69.  
  70.  
  71.  
  72.        Setting up ADJCLOCK
  73.        -------------------
  74.  
  75.        Here's how to teach this program the unaccuracy of your computer's
  76.        clock. Perform the following command:
  77.  
  78.            ADJCLOCK N [date] [time]
  79.  
  80.        This tells ADJCLOCK to start a New accuracy measure. A file named
  81.        ADJCLOCK.DAT is created in the directory where ADJCLOCK is.
  82.  
  83.        The optional date and time gives the current (correct) time. If
  84.        given, the PC's clock is set to reflect this. If not, the PC's time
  85.        is taken as correct.
  86.  
  87.        Now just let time pass. Wait several days or weeks (the longer the
  88.        better). You can do whatever you want (including turning off the
  89.        computer, of course), as long as you DO NOT adjust the computer's
  90.        clock. When the clock has become wrong enough, execute the following
  91.        command:
  92.  
  93.            ADJCLOCK S [date] time
  94.  
  95.        to Set the correct date and time. If the computer's date is correct,
  96.        the date can be omitted. The time _must_ be given. Since it is the
  97.        first time ADJCLOCK is used to set the time (it figures this out
  98.        from the contents of ADJCLOCK.DAT), it will check out how wrong the
  99.        clock was, and store information about this in ADJCLOCK.DAT.
  100.  
  101.  
  102.  
  103.        Using ADJCLOCK
  104.        --------------
  105.  
  106.        If you have performed the steps above, ADJCLOCK now knows the inac-
  107.        curacy of your computer's clock. It's then time to start adjusting
  108.        it. Enter the following line in your AUTOEXEC.BAT:
  109.  
  110.            ADJCLOCK A [-q]
  111.  
  112.        telling the program to [Quietly] Adjust your computer's clock. What
  113.        ADJCLOCK does when it gets this command, is checking ADJCLOCK.DAT to
  114.        see when the clock was last adjusted. It then calculates a new (and
  115.        hopefully more correct) time based on the inaccuracy measure.
  116.  
  117.        Now it is clear that ADJCLOCK needs to know when the clock was last
  118.        adjusted (correct). This should ring a bell. What happens if you (or
  119.        some program) manually adjusts the clock? ADJCLOCK won't know this,
  120.        thus making the clock incorrect the next time it is called. We some-
  121.        how need to tell ADJCLOCK that the clock is corrected manually. Use
  122.        the command
  123.  
  124.            ADJCLOCK U
  125.  
  126.        to make ADJCLOCK Update the ADJCLOCK.DAT -file. You can also Set the
  127.        clock using
  128.  
  129.            ADJCLOCK S [date] [time]
  130.  
  131.        This way the program automatically updates the .DAT -file.
  132.  
  133.  
  134.  
  135.        Finally
  136.        -------
  137.  
  138.        If you decide to use this program, thanks! I would be happy hearing
  139.        from you if you find any bugs, have any suggestions, or just to know
  140.        that one more person uses my program.
  141.  
  142.  
  143.  
  144.                                                    Sverre.
  145.  
  146.  
  147.